<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>3-12 vm.$attrs</title>
</head>
<body>
<div id="app">
    <test-component id="test"></test-component>
</div>
</body>
<script src="./js/vue.js"></script>
<script>
    Vue.component('test-component',{
        template:"<button @click='showAttribute'>look attribute</button>",
        methods:{
            showAttribute(){
                console.log(this.$attrs)
            }
        }
    })
    var vm=new Vue({
        el:"#app"
    })

</script>
</html>